<?php
use common\library\htmlHelper;

?>
<form class="layui-form">
    <div class="layui-form-item">
        <label class="layui-form-label">版本号</label>
        <div class="layui-input-inline">
            <input type="text" value="<?= \yii\helpers\ArrayHelper::getValue($Version, 'version_num') ?>"
                   class="layui-input" disabled readonly>
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">终端类型</label>
        <div class="layui-input-inline">
            <select lay-verify="required">
                <option <?= htmlHelper::issetAndEqual($Version, 'terminal_type', 'member', 'selected') ?>>会员</option>
                <option <?= htmlHelper::issetAndEqual($Version, 'terminal_type', 'proxy', 'selected') ?>>代理</option>
            </select>
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">APP类型</label>
        <div class="layui-input-inline">
            <input type="radio"
                   title="android" <?= htmlHelper::issetAndEqual($Version, 'app_type', 'android', 'checked') ?>>
            <input type="radio"
                   title="ios" <?= htmlHelper::issetAndEqual($Version, 'app_type', 'ios', 'checked') ?>>
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">下载地址</label>
        <div class="layui-input-inline">
            <input type="text" value="<?= \yii\helpers\ArrayHelper::getValue($Version, 'download_url') ?>"
                   class="layui-input" disabled readonly>
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">更新内容</label>
        <div class="layui-input-inline">
            <textarea class="layui-textarea" disabled
                      readonly><?= \yii\helpers\ArrayHelper::getValue($Version, 'update_content') ?></textarea>
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">更新类型</label>
        <div class="layui-input-block">
            <input type="radio"
                   title="强制更新" <?= htmlHelper::issetAndEqual($Version, 'update_way', 'forced', 'checked') ?>>
            <input type="radio"
                   title="自主更新" <?= htmlHelper::issetAndEqual($Version, 'update_way', 'autonomous', 'checked') ?>>
        </div>
    </div>
</form>
<script>
    layui.use(['form'], function () {
        layui.form();
    });
</script>